package com.xmutca.sso.api;

import org.hibernate.validator.constraints.NotBlank;

import java.io.Serializable;

/**
 * 权限
 * @author: 彭伟煌(pengweihuang@xmutca.com)
 * @create: 2016-08-08 14:27
 */
public class Permission implements Serializable {

    public final static Integer STATE_ENABLE = 1;
    public final static Integer STATE_UNABLE = 0;

    private Integer id;

    /**
     * 权限名称
     */
    @NotBlank(message = "权限名称不能为空")
    private String name;

    /**
     * 权限签名
     */
    @NotBlank(message = "权限签名不能为空")
    private String sign;

    /**
     * 所属菜单
     */
    private Integer menu;

    /**
     * 状态
     */
    private Integer state = STATE_ENABLE;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSign() {
        return sign;
    }

    public void setSign(String sign) {
        this.sign = sign;
    }

    public Integer getMenu() {
        return menu;
    }

    public void setMenu(Integer menu) {
        this.menu = menu;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }
}
